3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to determine point-relative ratios between two points. These routines return a point on the line segment defined by those two points that is at a desired distance from the first point.
You can use the Q3Point2D_RRatio function to find a point lying between two given two-dimensional points that is at a desired distance ratio from one of those points.
TQ3Point2D *Q3Point2D_RRatio (
const TQ3Point2D *p1,
const TQ3Point2D *p2,
float r1,
float r2,
TQ3Point2D *result);
You can use the Q3Param2D_RRatio function to find a point lying between two given two-dimensional parametric points that is at a desired distance ratio from one of those points.
TQ3Param2D *Q3Param2D_RRatio (
const TQ3Param2D *p1,
const TQ3Param2D *p2,
float r1,
float r2,
TQ3Param2D *result);
You can use the Q3Point3D_RRatio function to find a point lying between two given three-dimensional points that is at a desired distance ratio from one of those points.
TQ3Point3D *Q3Point3D_RRatio (
const TQ3Point3D *p1,
const TQ3Point3D *p2,
float r1,
float r2,
TQ3Point3D *result);
You can use the Q3RationalPoint4D_RRatio function to find a point lying between two given four-dimensional points that is at a desired distance ratio from one of those points.
TQ3RationalPoint4D *Q3RationalPoint4D_RRatio (
const TQ3RationalPoint4D *p1,
const TQ3RationalPoint4D *p2,
float r1,
float r2,
TQ3RationalPoint4D *result);
Previous | QD3D Book | Overview | Chapter Contents | Next |